using System.Collections;
using System.Collections.Generic;

namespace Mite
{
	/// <summary>
	/// Helper class for use with ISqlQueryFactory.Create method.
	/// </summary>
	public class AttributeCollection : IEnumerable<KeyValuePair<string, object>>
	{
		#region IEnumerable<KeyValuePair<string,object>> Members

		public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
		{
			return _list.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return _list.GetEnumerator();
		}

		#endregion

		public void SetAttribute(string name, object value)
		{
			_list.Add(new KeyValuePair<string, object>(name, value));
		}

		private readonly List<KeyValuePair<string, object>> _list = new List<KeyValuePair<string, object>>();
	}
}